<!-- 
    事件捕获 => 事件到达 = 事件冒泡
 -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #baby{
            height: 100px;
            width: 100px;
            background-color: red;
        }
        #Son{
            height: 200px;
            width: 200px;
            background-color: antiquewhite;
        }
        #Mother{
            height: 300px;
            width: 300px;
            background-color: blue;
        }
        #grandMother{
            height: 400px;
            width: 400px;
            background-color: green;
        }

    </style>
</head>
<body>
    <div id="grandMother">
        <div id="Mother">
            <div id="Son">
                <div id="baby">baby</div>
            </div>
        </div>
    </div>
</body>
<script>
    grandMother.addEventListener('click',()=>{
        console.log('grandMother')
    })
    Mother.addEventListener('click',()=>{
        console.log('Mother 事件捕获')
    },true)
    Son.addEventListener('click',()=>{
        console.log('Son 事件捕获')
    },true)
    baby.addEventListener('click',()=>{
        console.log('baby')
    })
</script>
</html>